<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="format-detection" content="telephone=no" />
		<link rel="stylesheet" href="./css/reset.css" type="text/css"/>
		<link href="./css/my-indent.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	
</head>
<body>
		<div class="zjzz-buylist-wear">
			
			<div class="zjzz-buylist-top">
				<a href="javascript:history.back()" class="zjzz-buylist-t1"></a>
				<span class="zjzz-buylist-t2">我的订单</span>
				<span class="zjzz-buylist-t3">
					<span class="zjzz-buylist-t4"></span>
				</span>
			</div>
				<div class="zjzz-buylist-top2">			
				<a href="./my-indent-all.jsp" class="zjzz-buylist-tp1">
					<i >全部</i>
				</a>
				<a href="./my-indent-dfk.jsp" class="zjzz-buylist-tp1">
					<i>待付款</i>
					<span class=""></span>
				</a>
				<a href="./my-indent-dsh.jsp" class="zjzz-buylist-tp1">
					<i>待收货</i>
					<span class=""></span>
				</a>
				<a href="./my-indent-pj.jsp" class="zjzz-buylist-tp1">
					<i class="zjzz-buylist-tp2">评论</i>
					<span class=""></span>
				</a>
			</div>		
			<div class="zjzz-buylist-mid">
				<!--评论-->
				<div class="zjzz-buylist-m1">
					<span class="zjzz-buylist-mt1" onclick="setTab2(1)"><i id="pj1" class="zjzz-buylist-mt2"></i></span>
					<span class="zjzz-buylist-mt1" onclick="setTab2(2)"><i id="pj2" >已评价</i></span>
					<div id="wpj" class="wpj"></div>
					<div class="zjzz-buylist-ms1" id="con_pj_2" style="display: none;">
					</div>
				</div>
			</div>
		</div>
		<script>
			function setTab2(value) {
				if(value==1){
					document.getElementById('pj2').className = '';
					document.getElementById('pj1').className = 'zjzz-buylist-mt2';
					$("#wpj").show();
					$("#con_pj_2").hide();
				}else{
					$("#con_pj_2").show();
					$("#wpj").hide();
					document.getElementById('pj1').className = '';
					document.getElementById('pj2').className = 'zjzz-buylist-mt2';
				}
			};
		</script>
			<script type="text/javascript">
		$(function(){
			var path="<%=request.getSession().getAttribute("path")%>";
			$.post("../../../tszs/txr/pj.do",function(data){
				$("#pj1").html("待评论("+data.data.length+")");
		    	 var html="";
		    	 for (var i = 0; i < data.data.length; i++) {
		    		  html+="<div class=\"zjzz-buylist-ms1\" id=\"con_pj_1\">"+
						"<div class=\"zjzz-buylist-goods\" style='padding-top: 10px;'>"+
						"<img src='/file/"+data.data[i].phtoto+"' />"+
						"<div class=\"zjzz-buylist-gdetail\">"+
							"<span class=\"zjzz-buylist-gtit\">"+data.data[i].c_name+"<br>"+data.data[i].c_describe+"</span>"+
						"</div>"+
						"<div class=\"zjzz-buylist-btn\">"+
							"<a href=\"javascript:pl('"+data.data[i].p_id+"')\")' class=\"zjzz-buylist-btn2\">"+data.data[i].href+"</a>"+
						"</div>"+
					"</div>"+
				"</div>"; 
				}
		    	 $(".wpj").html(html);
		     },"json")
		     
	 	     $.post("../../../tszs/txr/pjxiangqing.do",function(data){
		    	 var htmls="";
		    	 $("#pj2").html("已评论("+data.data.length+")");
		    	 for (var i = 0; i < data.data.length; i++) {
		    		  htmls+="<div class=\"zjzz-buylist-goods\"  style='padding-top: 10px;'>"+
		    		  "<img src='/file/"+data.data[i].phtoto+"' />"+
		  				"<div class=\"zjzz-buylist-gdetail\">"+
		  					"<span class=\"zjzz-buylist-gtit\" style='margin-top: unset;'>"+data.data[i].c_name+"<br><br>"+data.data[i].mcontent+"</span>"+
		  				"</div>"+
		  				"<div class=\"zjzz-buylist-btn\">"+
		  				"</div>"+
		  			"</div>"; 
				}
		    	 $("#con_pj_2").append(htmls);
		     },"json")
		    
		})
		function pl(id){
			 window.location.href="evaluate.jsp?id="+id;
		}
		function showShopCardatails(id){
			window.location.href="evaluate.jsp?id="+id;
		}
	</script>
	</body>
</html>
